clc;
D2R=pi/180;R2D=180/pi;
data=readmatrix('tightlycoupled.txt');
position=[1,1,2]; %time attitude  position

figure(1);% longtitude/latitude/height trajectory lines
plot3(data(:,position(3)),data(:,position(3)+1),data(:,position(3)+2),'b:.');
title('longtitude/latitude/height trajectory lines');
xlabel("latitude/°");ylabel("longtitude/°");zlabel("Height/m");
hold on;

figure(2);% % Longitude/latitude Curve
plot(data(:,position(3)),data(:,position(3)+1),'k:.');
title('longtitude/latitude trajectory lines');xlabel("latitude/°");ylabel("longtitude/°");
hold on;

figure(3);% Longitude/latitude height Curve
subplot(1,3,1);
plot(data(:,position(3)),'k-');
xlabel("Epoch/100HZ");ylabel("longtitude/°");
subplot(1,3,2);
plot(data(:,position(3)+1),'k-');
xlabel("Epoch/100HZ");ylabel("latitude/°");
subplot(1,3,3);
plot(data(:,position(3)+2),'k-');
xlabel("Epoch/100HZ");ylabel("height/m");
hold on;

figure(4);
subplot(1,3,1);
plot(data(:,position(3)),'k-');
xlabel("Epoch/100HZ");ylabel("velocity_E/m/s");
subplot(1,3,2);
plot(data(:,position(3)+1),'k-');
xlabel("Epoch/100HZ");ylabel("velocity_N/m/s");
subplot(1,3,3);
plot(data(:,position(3)+2),'k-');
xlabel("Epoch/100HZ");ylabel("velocity_U/m/s");
hold on;

figure(5);% Longitude/latitude height Curve
subplot(1,3,1);
plot(data(:,position(3))*R2D,'k-');
xlabel("Epoch/100HZ");ylabel("attitude_E/rad");
subplot(1,3,2);
plot(data(:,position(3)+1)*R2D,'k-');
xlabel("Epoch/100HZ");ylabel("attitude_N/rad");
subplot(1,3,3);
plot(data(:,position(3)+2)*R2D,'k-');
xlabel("Epoch/100HZ");ylabel("attitude_U/rad");
hold on;